<div class="container-fluid form-horizontal" style="padding-top: 20px">
  
  <div class="form-group">
    <label class="col-md-2 control-label">景区</label>
    <div class="col-md-3">
      <ui-select ng-model="tickettypeobj.view_code" theme="bootstrap">
        <ui-select-match placeholder="请选择一个景区">{{$select.selected.name}}</ui-select-match>
        <ui-select-choices repeat="item.code as item in page.viewlist | filter: $select.search">
          <span>{{item.name}}（{{item.code}}）</span>
        </ui-select-choices>
      </ui-select>
     </div>
    <label class="col-md-2 control-label">票种名称</label>
    <div class="col-md-3">
      <input type="text" class="form-control" placeholder="xxx票" ng-model="tickettypeobj.name"/>
    </div>
  </div>

  <div class="form-group">
    <label class="col-md-2 control-label">购买后有效天数</label>
    <div class="col-md-3">
      <ui-select ng-model="tickettypeobj.buy_effective_day" theme="bootstrap">
        <ui-select-match>{{$select.selected.label}}</ui-select-match>
        <ui-select-choices repeat="e_day.value as e_day in page.buy_effective_dayarr | filter: $select.search">
          <span ng-bind-html="e_day.label | highlight: $select.search"></span>
        </ui-select-choices>
      </ui-select>
    </div>
    <label class="col-md-2 control-label">可销次数</label>
    <div class="col-md-3">
      <input type="number" class="form-control form-inline" placeholder="1" ng-model="tickettypeobj.sheets_number"/>
    </div>
  </div>

  <div class="form-group">
    <label class="col-md-2 control-label">有效期开始</label>
    <div class="col-md-3">
      <div class="input-group" ng-click="dateOpen(date1, $event)">
        <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date1.label" readonly
        is-open="date1.opened" placeholder="开始时间" close-text="关闭" current-text="今天" clear-text="清除"/>
        <span class="input-group-btn">
          <button type="button" class="btn btn-default">
            <i class="glyphicon glyphicon-calendar"></i>
          </button>
        </span>
      </div>
    </div>
    <label class="col-md-2 control-label">有效期结束</label>
    <div class="col-md-3">
      <div class="input-group" ng-click="dateOpen(date2, $event)">
        <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date2.label" readonly
        is-open="date2.opened" placeholder="结束时间" close-text="关闭" current-text="今天" clear-text="清除"/>
        <span class="input-group-btn">
          <button type="button" class="btn btn-default">
            <i class="glyphicon glyphicon-calendar"></i>
          </button>
        </span>
      </div>
    </div>
  </div>

  <div class="form-group">
    <label class="col-md-2 control-label">是否需要预约</label>
    <div class="col-md-3">
      <select class="form-control" ng-model="tickettypeobj.appoint" ng-disabled="obj.ticket_type_attr == '10'">
        <option value="0">无需预约</option>
        <option value="1">需要预约</option>
      </select>
    </div>
    <label class="col-md-2 control-label">有效期范围</label>
    <div class="col-md-3">
      <textarea type="text" class="form-control form-inline" ng-click="addTime(tickettypeobj)" 
      readonly ng-model="tickettypeobj.period_scope" style="width: 100%; word-wrap:break-word" />
    </div>
  </div>

  <div class="form-group" ng-if="util.what == 'edit'">
    <div class="col-md-2 col-md-offset-5">
      <button type="button" class="btn btn-primary btn-lg btn-block" ng-click="save()" ng-disabled="page.isLoading">保存</button>
    </div>
  </div>
    
  <style type="text/css">
    .col-lg-1,
    .col-lg-10,
    .col-lg-11,
    .col-lg-12,
    .col-lg-2,
    .col-lg-3,
    .col-lg-4,
    .col-lg-5,
    .col-lg-6,
    .col-lg-7,
    .col-lg-8,
    .col-lg-9,
    .col-md-1,
    .col-md-10,
    .col-md-11,
    .col-md-12,
    .col-md-2,
    .col-md-3,
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-7,
    .col-md-8,
    .col-md-9,
    .col-sm-1,
    .col-sm-10,
    .col-sm-11,
    .col-sm-12,
    .col-sm-2,
    .col-sm-3,
    .col-sm-4,
    .col-sm-5,
    .col-sm-6,
    .col-sm-7,
    .col-sm-8,
    .col-sm-9,
    .col-xs-1,
    .col-xs-10,
    .col-xs-11,
    .col-xs-12,
    .col-xs-2,
    .col-xs-3,
    .col-xs-4,
    .col-xs-5,
    .col-xs-6,
    .col-xs-7,
    .col-xs-8,
    .col-xs-9 {
        position: inherit !important;
        ;
    }
  </style>
</div>